<?php /* Smarty version Smarty-3.1.14, created on 2013-07-25 14:15:46
         compiled from "libs\Smarty\templates\add_usuario.tpl" */ ?>
<?php /*%%SmartyHeaderCode:2224951f13312148615-54485668%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'cc11ad2188c550a3bbc2e2ec96d325ef9a44465b' => 
    array (
      0 => 'libs\\Smarty\\templates\\add_usuario.tpl',
      1 => 1374671517,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '2224951f13312148615-54485668',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'titulo' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.14',
  'unifunc' => 'content_51f133121c3a67_84521072',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_51f133121c3a67_84521072')) {function content_51f133121c3a67_84521072($_smarty_tpl) {?><?php  $_config = new Smarty_Internal_Config("test.conf", $_smarty_tpl->smarty, $_smarty_tpl);$_config->loadConfigVars("setup", 'local'); ?>
<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['titulo']->value;?>
<?php $_tmp1=ob_get_clean();?><?php echo $_smarty_tpl->getSubTemplate ("header.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array('title'=>$_tmp1), 0);?>

<?php echo $_smarty_tpl->getSubTemplate ("menu.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>


<script type="text/javascript">$(document).ready(function(){$('#cad_usuario').submit(function() {if ($("#nome").val() == "" || $("#nome").val().length < 3){$("span").text("Preencha o campo nome, com mais de 3 caracteres").show();return false;}else if ($("#login").val() == "" || $("#login").val().length < 3){$("span").text("Preencha o campo login, com mais de 3 caracteres").show();return false;}else if ($("#senha").val() == "" || $("#senha").val().length < 6){$("span").text("Preencha o campo senha, com mais de 6 caracteres").show();return false;}else if ($("#repita_senha").val() != $("#senha").val()){$("span").text("Senha não confere").show();return false;}else if ($("#perfil").val() == 0){$("span").text("Selecione um perfil").show();return false;}else{return true;}});});</script>

<div class="container">
	
	<form method='POST' action='usuario.php' class="form-signin" id='cad_usuario'>
	   
	   <fieldset>
	    <legend>Novo Usuário</legend>
	    <label>Nome</label>
	    <input type="text" placeholder="nome do usuário" name='nome' id='nome' >
	    
	    <label>Login</label>
	    <input type="text" placeholder="login de acesso" name='login' id='login'>
	    
	    <label>Senha</label>
	    <input type="password" placeholder="Senha" name='senha' id='senha'>
	    
	    <label>Repita Senha</label>
	    <input type="password" placeholder="Repita senha" name='repita_senha' id='repita_senha'>
	    
	    <label>Perfil</label>
	    <select name='perfil' id='perfil'>
	    	<option value='0'>Selecione um perfil</option>
			<option value='adm'>Administrador</option>
			<option value='usu'>Usuário</option>
		</select>
	   
	   	<br />
	    <button type="submit" class="btn" value='salvar'>Cadastrar</button>
	    <span style='display: none;' class="alert alert-error"></span> 
	  </fieldset>
	  
	  <input type='hidden' name='action' value='addUsuario' />
	</form> 
	
</div> <!-- /container -->
    
<?php echo $_smarty_tpl->getSubTemplate ("footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>
<?php }} ?>